package Book;

public class Booklist {
    private Book[] books = new Book[10];
    private int usedsize;//计数器 来记录 当前实际放的书的数目

    public Booklist() {
        //构造方法初始化成员
        this.books[0] = new Book("三国演义","罗贯中",28,"小说");
        this.books[1] = new Book("西游记","吴承恩",30,"小说");
        this.books[2] = new Book("红楼梦","曹雪芹",35,"小说");
        this.usedsize = 3;
    }

    public Book getBooks(int pos){
        return this.books[pos];
    }
    public void setBooks(int pos,Book book){
        this.books[pos] = book;
    }
    public int getUsedsize() {
        return usedsize;
    }

    public void setUsedsize(int usedsize) {
        this.usedsize = usedsize;
    }
}
